import request from "../utils/request";
type API<T = any> = (...args: T[]) => Promise<any>
//获取菜单
export const getMenuApi: API<{}>= (username) => request(`/menu/${username}`, {
    method: 'get', 
})
//获取全部菜单
export const getMenuAllApi = (query?:any) => {
    return request('/menu', {
        method: 'get',
        query
    })
}
export const getMenuByRole = (roleId:string) => {
    return request(`/role/menu/${roleId}`, {
        method: 'get',
        
    })
}